package com.yanmaohu.nikita.data.function.statement;

import com.yanmaohu.nikita.data.expression.Expression;
import com.yanmaohu.nikita.data.function.FunctionBody;

/**
 * @author Bright Lee
 */
public final class WhileStatement extends LoopStatement {

    private Expression condition;
    private FunctionBody functionBody;

    public WhileStatement(int beginIndex, int endIndex, Expression condition, FunctionBody functionBody) {
        super(beginIndex, endIndex);
        this.condition = condition;
        this.functionBody = functionBody;
    }

    public Expression getCondition() {
        return condition;
    }

    public FunctionBody getStatementList() {
        return functionBody;
    }

}
